#include <iostream>
#include <sstream>
#include <jsoncpp/json/json.h>
using namespace std;
int main()
{
    Json::Value root;
    root["age"]=18;
    root["sex"]="男";
    root["email"]="dshadasjgd";

    Json::StreamWriterBuilder write;
    std::unique_ptr<Json::StreamWriter> w(write.newStreamWriter());
    std::stringstream s1;
    Json::Reader reader;
    reader.parse(s1,root);
    std::cout<<root["age"].asInt()<<std::endl;

    
    // w->write(root,&s1);
    // std::cout<<s1.str()<<std::endl;
    // cout<<root<<endl;
    // cout<<"======"<<endl;
    // Json::FastWriter s;
    // string s1=s.write(root);
    // cout<<s1<<endl;

    return 0;
}